Skip to content

T1.1 (2/8): People Portal client, semester settings and Gitea login resolution - #173

Open
SuperNova-W wants to merge 1 commit into
t1/1a-source-rowsfrom
t1/1b-people-portal-client
Open

SuperNova-W wants to merge 1 commit into
t1/1a-source-rowsfrom
t1/1b-people-portal-client

Conversation

@SuperNova-W

Copy link
Copy Markdown
Collaborator
  • PeoplePortalClient reads GET /api/horizon/projects (T3.1) with the
    shared service token and validates the payload with
    parse_project_sources. A missing URL or token is a configuration error.
  • Settings HORIZON_PEOPLEPORTAL_BASE_URL, HORIZON_PEOPLEPORTAL_SERVICE_TOKEN
    (HORIZON_SERVICE_TOKEN also accepted), HORIZON_SEASON_TYPE and
    HORIZON_SEASON_YEAR, with empty values in .env.example.
  • identity.resolve_gitea_login is the one place a Gitea login resolves to
    an Authentik pk: the username equals the login, ignoring case. A blank,
    unknown or ambiguous login stays None and is never guessed. T1.3 adds
    aliases inside this helper.

This is the T1.1 implementation from the final-integration branch, split into PRs under 500 lines. The code is unchanged from the version that filled the test Supabase, except that the assets use master's plain asset keys and groups, and the tests are split into one file per PR.

Stack

Track 1 (T1.1), stacked on the Track 4 stack (#156–#170). Review and merge in order; each PR shows only its own change.

  1. t4/7c-staging-runner (Track 4 staging (3/3): Run the ranking graph end to end on staging and check it #170), the top of the Track 4 stack. When Track 4 staging (3/3): Run the ranking graph end to end on staging and check it #170 merges and its branch is deleted, GitHub moves PR 1 onto master.
  2. t1/1a-source-rows project and pull request source rows and the People Portal payload
  3. t1/1b-people-portal-client People Portal client, semester settings and Gitea login resolution ← this PR
  4. t1/1c-gitea-pr-sources Gitea organization repositories, PRs, reviews and review requests
  5. t1/1d-persist-sources the six source tables and their atomic upsert
  6. t1/1e-source-assets source assets, the ingest_project_sources job and blame run requests
  7. t1/1f-source-checks blocking source checks; a project with no repository only warns
  8. t1/1g-authentik-roster read the project roster from Authentik until T3.1 is deployed
  9. t1/1h-fixture-runner local fixture run of the source graph

Testing

  • ./nx run horizon-dag:check passes on this branch (pytest and ruff); every branch of the stack was checked on its own. The database tests ran against a local Postgres 16 (TEST_POSTGRES_URL, HORIZON_TEST_DATABASE_URL); without them they are skipped.
  • The top of the stack, checked on 2026-11-25:
    • scripts/run_t1_1_fixture.py ran the real ingest_project_sources job end to end: all six tables filled, the run manifest written and all three checks passed.
    • Against the real Gitea, the stack's assets fetched every Fall 2026 project repository (6 repositories, 122 PRs, 143 reviews, 44 review requests) and nothing was written. Every PR, review and request that the test Supabase got from the Nov 15 ingest is identical. The only differences are activity after Nov 15: new PRs, reviews and requests, PRs closed or merged since, branches deleted after merge, and one repository's default branch.
    • The roster was not re-read live, because the Authentik token in horizon/.env has expired. It was checked round-trip from the rows on the test Supabase.

Size: 7 files changed, 205 insertions(+), 1 deletion(-).

…esolution

- PeoplePortalClient reads GET /api/horizon/projects (T3.1) with the
  shared service token and validates the payload with
  parse_project_sources. A missing URL or token is a configuration error.
- Settings HORIZON_PEOPLEPORTAL_BASE_URL, HORIZON_PEOPLEPORTAL_SERVICE_TOKEN
  (HORIZON_SERVICE_TOKEN also accepted), HORIZON_SEASON_TYPE and
  HORIZON_SEASON_YEAR, with empty values in .env.example.
- identity.resolve_gitea_login is the one place a Gitea login resolves to
  an Authentik pk: the username equals the login, ignoring case. A blank,
  unknown or ambiguous login stays None and is never guessed. T1.3 adds
  aliases inside this helper.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant